<template>
  <div>
    <h1>"{{ info.category }}"类目录下文章列表</h1>
    <router-link to="/">>>>返回首页</router-link>
    <div class="box" v-for="(item, index) in info.blogs" :key="index">
      <ul>
        <router-link :to="info.url + '/' + item.id"
          ><li>{{ item.title }}</li></router-link
        >
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      info: {},
    };
  },
  created() {
    this.info = this.$store.state.category.find((item) => {
      return item.id === parseInt(this.$route.params.id);
    });
    // console.log(this.info);
  },
};
</script>

<style lang="scss" scoped>
ul {
  margin-top: 30px;
}
ul li {
  border-bottom: 1px solid black;
  font-size: 26px;
  line-height: 30px;
}
</style>